package com.peng;

import java.io.IOException;
import java.util.Properties;

public class PropertiesManager {
    public static Properties properties = new Properties();

    static {
        try {
            properties.load(PropertiesManager.class.getClassLoader().getResourceAsStream("config"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }


    public static String getValue(String key) {
        if (properties == null) {
            return null;
        }
        String property = properties.getProperty(key);
        return property;
    }
}
